/**
 * Created by RagPanda on 2016/3/9.
 */
$admin_sRequestController = $app.controller("admin_sRequest",function($scope,$location)
{
    $scope.goIndex = function(){
        $location.path("/index")
    };
    $scope.goDetail = function($id){
        $location.path("/detail/"+$id);
    };
    $scope.name='hellow angularjs';

});
$admin_sRequestController.config(["$routeProvider",function($routeProvider){
    $routeProvider.when("/index",{
        templateUrl:"/views/admin/tenement/sRequest/index.html",
        controller:"admin_sRequest_index"
    }).when("/detail/:id",{
        templateUrl:"/views/admin/tenement/sRequest/detail.html",
        controller:"admin_sRequest_detail"
    }).otherwise({redirectTo:'/index'});

}]);

$admin_sRequestController.controller("admin_sRequest_index",function($scope){
    $scope.requerstData = [
        {
            request_id:"1",
            class_name:"xxx",
            status_name:"xxx",
            request_create_time:"xxx",
            user_id:"hanixi"
        },
        {
            request_id:"1",
            class_name:"xxx",
            status_name:"xxx",
            request_create_time:"xxx",
            user_id:"hanixi"
        },
        {
            request_id:"1",
            class_name:"xxx",
            status_name:"xxx",
            request_create_time:"xxx",
            user_id:"hanixi"
        }
    ];

});

$admin_sRequestController.controller("admin_sRequest_detail",function($scope, $routeParams){
    $scope.id = $routeParams.id;
    __component_messageBar_setMessage(true,"hahahah");
    __component_messageBar_open();
});